package team18.yuejian.Server;

import java.util.List;
import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Query;
import team18.yuejian.bean.NoteBean;
import team18.yuejian.bean.PicBean;
import team18.yuejian.bean.PicDeteilBean;
import team18.yuejian.bean.ReviewBean;
import team18.yuejian.bean.UserBean;

public interface ShowPicService {

    @GET("lists/showpic")
    Call<List<PicBean>> PicList();

    @Multipart
    @POST("add/showpic")
    Call<NoteBean> AddPic (
            @PartMap Map<String, RequestBody> bodyMap,
            @Part MultipartBody.Part file
    );

    @GET("lists/showpic")
    Call<PicDeteilBean> getDetail(@Query("spid") int spid);

    @GET("lists/review")
    Call<List<ReviewBean>> getReview(@Query("spid") int spid);

    @GET("add/review")
    Call<NoteBean> addReview(
            @Query("uid") int uid,
            @Query("spid") int spid,
            @Query("rconment") String conment
    );
}
